﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace nodeAddress
{
    class Program
    {
        static void Main(string[] args)
        {
            UInt16 sending = 31;
            UInt16 destination = 5;
            UInt16 shiftedSending = Convert.ToUInt16( sending << 5);
            UInt16 result = Convert.ToUInt16(shiftedSending | destination);
            UInt16 undo = Convert.ToUInt16(result >> 5);
            Console.WriteLine("Sending Node: " + Convert.ToString(sending, 2));
            Console.WriteLine("Destination Node: " + Convert.ToString(destination, 2));
            Console.WriteLine("Shift Sending Node: " + Convert.ToString(shiftedSending, 2));
            Console.WriteLine("Result | - " + Convert.ToString(result, 2));
            Console.WriteLine("Undo | - " + Convert.ToString(undo, 2));
            Console.WriteLine("Wait");
        }
    }
}
